import request from "@/utils/request";

//商品列表接口
export const api_query = (data) => request.get('goods', data);

//添加商品接口
export const api_save = (data) => request.post('goods', data);

//商品分类列表
export const api_categories = (data) => request.get('categories', data);

//添加商品分类
export const api_catesave = (data) => request.post('categories', data);

//删除商品分类
export const api_delcate = ({ id }) => request.delete(`categories/${id}`);

//编辑商品分类
export const api_updcate = (url, data) => request.put(url,data);